package cn.com.sbell.vss.csg.vap;

import org.dom4j.Element;

import cn.com.sbell.vss.csg.vap.bean.NetManageInfo;
import cn.com.sbell.vss.csg.vsclient.VsClient;
import cn.com.sbell.vss.csg.vsclient.util.PropertiesHolder;

public class GetNetManageInfo extends ProtectedVsCommander {

	protected Element executeCommand(VsClient vsClient,
			PropertiesHolder holder, Element root) {
		NetManageInfo netManageInfo = vsClient.getNetManageInfo();
		
		root.addElement("managerServerIp").addText(toString(netManageInfo.getManagerServerIp()));
		root.addElement("managerServerPort").addText(toString(netManageInfo.getManagerServerPort()));
		root.addElement("heartBeatServerIp").addText(toString(netManageInfo.getHeartBeatServerIp()));
		root.addElement("heartBeatPort").addText(toString(netManageInfo.getHeartBeatPort()));
		root.addElement("registerServerIp").addText(toString(netManageInfo.getRegisterServerIp()));
		root.addElement("registerPort").addText(toString(netManageInfo.getRegisterPort()));
		root.addElement("enableHeartBeat").addText(toString(netManageInfo.getEnableHeartBeat()));
		root.addElement("heartBeatPeriod").addText(toString(netManageInfo.getHeartBeatPeriod()));
		root.addElement("registerValidTime").addText(toString(netManageInfo.getRegisterValidTime()));
		root.addElement("vapPath").addText(toString(netManageInfo.getVapPath()));
		return root;
	}

}
